package com.lagou.edu.ssssession.form;

import com.lagou.edu.ssssession.dto.ResumeDto;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;
import org.springframework.beans.BeanUtils;

import java.io.Serializable;

/**
 *
 */
@Data
public class ResumeForm implements Serializable {

    private Long id;
    @NotBlank(message = "名字不能为空")
    private String name;
    @NotBlank(message = "地址不能为空")
    private String address;
    @NotBlank(message = "手机号不能为空")
    private String phone;


    public ResumeDto toDto() {
        ResumeDto resumeDto=new ResumeDto();
        BeanUtils.copyProperties(this,resumeDto);
        return resumeDto;
    }
}
